Skip to content

FOUR-30587 Actions By Email - Handle Replies process creating request…#8811

Merged
nolanpro merged 3 commits into
developfrom
bugfix/FOUR-30587
Jun 8, 2026
Merged

FOUR-30587 Actions By Email - Handle Replies process creating request…#8811
nolanpro merged 3 commits into
developfrom
bugfix/FOUR-30587

Conversation

@gproly

@gproly gproly commented May 6, 2026

Copy link
Copy Markdown
Contributor

…s even the ABE is not used

Description:
Skip ABE Handle Replies timer when inbound mail config is inadequate

  • Gate timer start in TaskSchedulerManager::executeTimerStartEvent() for the Handle Replies process before WorkflowManager::triggerStartEvent().
  • Treat config as adequate only when host, username, and credentials exist (password or OAuth token keys under abe_imap_*).
  • Log and rename test to testScheduleMustNotStartHandleRepliesTimerWhenAbeInboundConfigInadequate.

Related tickets:
https://processmaker.atlassian.net/browse/FOUR-30587

Test1

ci:package-actions-by-email:bugfix/FOUR-30587
ci:deploy

…s even the ABE is not used

Description:
Skip ABE Handle Replies timer when inbound mail config is inadequate

- Gate timer start in `TaskSchedulerManager::executeTimerStartEvent()` for the Handle Replies process before `WorkflowManager::triggerStartEvent()`.
- Treat config as adequate only when host, username, and credentials exist (password or OAuth token keys under `abe_imap_*`).
- Log and rename test to `testScheduleMustNotStartHandleRepliesTimerWhenAbeInboundConfigInadequate`.

Related tickets:
https://processmaker.atlassian.net/browse/FOUR-30587
gproly added 2 commits May 19, 2026 07:56
…ound mail

Problem:
- The scheduled command `package-actions-by-email:check-handler-process-stopped`
  runs every minute and was restarting the "Actions By Email - Handle Replies"
  process even when ABE was not in use or IMAP/OAuth was missing or invalid.
- That caused extra system requests, scheduler noise, and repeated IMAP errors
  (FOUR-28485, FOUR-30587).

Solution:
- Skip the watchdog when there are no active ABE subprocess tasks.
- Skip restart when inbound mail configuration is incomplete (standard IMAP,
  Gmail OAuth, or Office 365 OAuth).
- Harden core timer-start guard so Handle Replies timer events are not started
  without adequate ABE inbound settings, using `package_key` and correct
  setting/env variable checks.

Modified files:
- package-actions-by-email/src/Console/Commands/CheckHandlerProcessStopped.php
- package-actions-by-email/src/ProcessProvider.php
- processmaker4/ProcessMaker/Managers/TaskSchedulerManager.php

Tests:
- package-actions-by-email/tests/Feature/CheckHandlerProcessStoppedCommandTest.php (new)
- package-actions-by-email/tests/ProcessProviderTest.php
- processmaker4/tests/unit/ProcessMaker/Managers/TaskSchedulerManagerTest.php
@processmaker-sonarqube

Copy link
Copy Markdown

@pmPaulis pmPaulis requested a review from marcoAntonioNina May 19, 2026 14:11
@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-a72a7f274c.engk8s.processmaker.net

@nolanpro nolanpro merged commit 0a0f675 into develop Jun 8, 2026
45 of 52 checks passed
@nolanpro nolanpro deleted the bugfix/FOUR-30587 branch June 8, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants